package com.lemon.gateway.service;

import com.lemon.common.core.exception.CaptchaException;
import com.lemon.common.core.web.domain.AjaxResult;

import java.io.IOException;

/**
 * 验证码处理
 *
 * @author huangpeng
 */
public interface ValidateCodeService
{
    /**
     * 生成验证码
     */
    public AjaxResult createCaptcha() throws IOException, CaptchaException;

    /**
     * 校验验证码
     * @Title: checkCaptcha
     * @Description: 校验验证码
     * @param key 验证码
     * @param value uuid
     * @param type 验证码类型，1普通验证码，2邮箱验证码
     * @return: void
     * @throws:
     * @author: huangpeng
     * @Date: 2023/11/26 1:08
     */
    public void checkCaptcha(String key, String value, String type) throws CaptchaException;
}
